﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="IssuesReportDataset" targetNamespace="http://tempuri.org/IssuesReportDataset.xsd" xmlns:mstns="http://tempuri.org/IssuesReportDataset.xsd" xmlns="http://tempuri.org/IssuesReportDataset.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="2" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="SQLServerHealthCheck_DatabaseDeployConnectionString" IsAppSettingsProperty="true" Modifier="Assembly" Name="SQLServerHealthCheck_DatabaseDeployConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.SQLServerOptimizer.PL.WPF.Properties.Settings.GlobalReference.Default.SQLServerHealthCheck_DatabaseDeployConnectionString" Provider="System.Data.SqlClient" />
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="SQLServerHealthCheckDeployConnectionString" IsAppSettingsProperty="true" Modifier="Public" Name="SQLServerHealthCheckDeployConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.SQLServerOptimizer.PL.WPF.Properties.Settings.GlobalReference.Default.SQLServerHealthCheckDeployConnectionString" Provider="System.Data.SqlClient" />
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="SQLServerOptimizerConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="SQLServerOptimizerConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.SQLServerOptimizer.PL.WPF.Properties.Settings.GlobalReference.Default.SQLServerOptimizerConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="IssuesTableAdapter" GeneratorDataComponentClassName="IssuesTableAdapter" Name="Issues" UserDataComponentName="IssuesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="SQLServerOptimizerConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        Issues.IssueId, Issues.Issue, Issues.Scope, Issues.Severity, Issues.Category, Issues.Server, Issues.Service, Issues.[Database], Issues.Recommendation, 
                         Issues.HowToTitle, Issues.HowToURL, Service.ServiceTypeID, Issues.ServiceId
FROM            Issues LEFT OUTER JOIN
                         Service ON Issues.ServiceId = Service.ServiceID
WHERE        (Issues.Severity = @High OR
                         Issues.Severity = @Mid OR
                         Issues.Severity = @Low) AND (Issues.ServiceId = @ServiceID) AND (Issues.DatabaseId = @DatabaseID) AND (Service.ServiceID IS NULL) OR
                         (Issues.Severity = @High OR
                         Issues.Severity = @Mid OR
                         Issues.Severity = @Low) AND (Issues.DatabaseId = @DatabaseID) AND (Service.ServiceID IS NULL) AND (@ServiceID = - 1) OR
                         (Issues.Severity = @High OR
                         Issues.Severity = @Mid OR
                         Issues.Severity = @Low) AND (Issues.ServiceId = @ServiceID) AND (Service.ServiceID IS NULL) AND (@DatabaseID = - 1) OR
                         (Issues.Severity = @High OR
                         Issues.Severity = @Mid OR
                         Issues.Severity = @Low) AND (Service.ServiceID IS NULL) AND (@ServiceID = - 1) AND (@DatabaseID = - 1) OR
                         (Issues.Severity = @High OR
                         Issues.Severity = @Mid OR
                         Issues.Severity = @Low) AND (Issues.ServiceId = @ServiceID) AND (Issues.DatabaseId = @DatabaseID) AND (Service.ServiceTypeID = 1) OR
                         (Issues.Severity = @High OR
                         Issues.Severity = @Mid OR
                         Issues.Severity = @Low) AND (Issues.DatabaseId = @DatabaseID) AND (@ServiceID = - 1) AND (Service.ServiceTypeID = 1) OR
                         (Issues.Severity = @High OR
                         Issues.Severity = @Mid OR
                         Issues.Severity = @Low) AND (Issues.ServiceId = @ServiceID) AND (@DatabaseID = - 1) AND (Service.ServiceTypeID = 1) OR
                         (Issues.Severity = @High OR
                         Issues.Severity = @Mid OR
                         Issues.Severity = @Low) AND (@ServiceID = - 1) AND (@DatabaseID = - 1) AND (Service.ServiceTypeID = 1)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="High" ColumnName="Severity" DataSourceName="SQLServerOptimizer.dbo.Issues" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@High" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Severity" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="Mid" ColumnName="Severity" DataSourceName="SQLServerOptimizer.dbo.Issues" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Mid" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Severity" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="Low" ColumnName="Severity" DataSourceName="SQLServerOptimizer.dbo.Issues" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Low" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Severity" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ServiceID" ColumnName="ServiceId" DataSourceName="SQLServerOptimizer.dbo.Issues" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ServiceID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ServiceId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="DatabaseID" ColumnName="DatabaseId" DataSourceName="SQLServerOptimizer.dbo.Issues" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DatabaseID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="DatabaseId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Issue" DataSetColumn="Issue" />
              <Mapping SourceColumn="Scope" DataSetColumn="Scope" />
              <Mapping SourceColumn="Severity" DataSetColumn="Severity" />
              <Mapping SourceColumn="Server" DataSetColumn="Server" />
              <Mapping SourceColumn="Service" DataSetColumn="Service" />
              <Mapping SourceColumn="Database" DataSetColumn="Database" />
              <Mapping SourceColumn="Recommendation" DataSetColumn="Recommendation" />
              <Mapping SourceColumn="Category" DataSetColumn="Category" />
              <Mapping SourceColumn="HowToTitle" DataSetColumn="HowToTitle" />
              <Mapping SourceColumn="HowToURL" DataSetColumn="HowToURL" />
              <Mapping SourceColumn="IssueId" DataSetColumn="IssueId" />
              <Mapping SourceColumn="ServiceTypeID" DataSetColumn="ServiceTypeID" />
              <Mapping SourceColumn="ServiceId" DataSetColumn="ServiceId" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="IssuesReportDataset" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="IssuesReportDataset" msprop:Generator_UserDSName="IssuesReportDataset">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Issues" msprop:Generator_TableClassName="IssuesDataTable" msprop:Generator_TableVarName="tableIssues" msprop:Generator_TablePropName="Issues" msprop:Generator_RowDeletingName="IssuesRowDeleting" msprop:Generator_UserTableName="Issues" msprop:Generator_RowChangingName="IssuesRowChanging" msprop:Generator_RowEvHandlerName="IssuesRowChangeEventHandler" msprop:Generator_RowDeletedName="IssuesRowDeleted" msprop:Generator_RowEvArgName="IssuesRowChangeEvent" msprop:Generator_RowChangedName="IssuesRowChanged" msprop:Generator_RowClassName="IssuesRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Issue" msprop:Generator_ColumnVarNameInTable="columnIssue" msprop:Generator_ColumnPropNameInRow="Issue" msprop:Generator_ColumnPropNameInTable="IssueColumn" msprop:Generator_UserColumnName="Issue" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="8000" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Scope" msprop:Generator_ColumnVarNameInTable="columnScope" msprop:Generator_ColumnPropNameInRow="Scope" msprop:Generator_ColumnPropNameInTable="ScopeColumn" msprop:Generator_UserColumnName="Scope" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Severity" msprop:Generator_ColumnVarNameInTable="columnSeverity" msprop:Generator_ColumnPropNameInRow="Severity" msprop:Generator_ColumnPropNameInTable="SeverityColumn" msprop:Generator_UserColumnName="Severity" type="xs:int" minOccurs="0" />
              <xs:element name="Server" msprop:Generator_ColumnVarNameInTable="columnServer" msprop:Generator_ColumnPropNameInRow="Server" msprop:Generator_ColumnPropNameInTable="ServerColumn" msprop:Generator_UserColumnName="Server" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="500" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Service" msprop:Generator_ColumnVarNameInTable="columnService" msprop:Generator_ColumnPropNameInRow="Service" msprop:Generator_ColumnPropNameInTable="ServiceColumn" msprop:Generator_UserColumnName="Service" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="500" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Database" msprop:Generator_ColumnVarNameInTable="columnDatabase" msprop:Generator_ColumnPropNameInRow="Database" msprop:Generator_ColumnPropNameInTable="DatabaseColumn" msprop:Generator_UserColumnName="Database" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2000" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Recommendation" msprop:Generator_ColumnVarNameInTable="columnRecommendation" msprop:Generator_ColumnPropNameInRow="Recommendation" msprop:Generator_ColumnPropNameInTable="RecommendationColumn" msprop:Generator_UserColumnName="Recommendation" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="8000" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Category" msprop:Generator_ColumnVarNameInTable="columnCategory" msprop:Generator_ColumnPropNameInRow="Category" msprop:Generator_ColumnPropNameInTable="CategoryColumn" msprop:Generator_UserColumnName="Category" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="500" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="HowToTitle" msprop:Generator_ColumnVarNameInTable="columnHowToTitle" msprop:Generator_ColumnPropNameInRow="HowToTitle" msprop:Generator_ColumnPropNameInTable="HowToTitleColumn" msprop:Generator_UserColumnName="HowToTitle" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="8000" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="HowToURL" msprop:Generator_ColumnVarNameInTable="columnHowToURL" msprop:Generator_ColumnPropNameInRow="HowToURL" msprop:Generator_ColumnPropNameInTable="HowToURLColumn" msprop:Generator_UserColumnName="HowToURL" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="8000" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="IssueId" msprop:Generator_ColumnVarNameInTable="columnIssueId" msprop:Generator_ColumnPropNameInRow="IssueId" msprop:Generator_ColumnPropNameInTable="IssueIdColumn" msprop:Generator_UserColumnName="IssueId" type="xs:int" />
              <xs:element name="ServiceTypeID" msprop:Generator_ColumnVarNameInTable="columnServiceTypeID" msprop:Generator_ColumnPropNameInRow="ServiceTypeID" msprop:Generator_ColumnPropNameInTable="ServiceTypeIDColumn" msprop:Generator_UserColumnName="ServiceTypeID" type="xs:int" minOccurs="0" />
              <xs:element name="ServiceId" msprop:Generator_ColumnVarNameInTable="columnServiceId" msprop:Generator_ColumnPropNameInRow="ServiceId" msprop:Generator_ColumnPropNameInTable="ServiceIdColumn" msprop:Generator_UserColumnName="ServiceId" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Issues" />
      <xs:field xpath="mstns:IssueId" />
    </xs:unique>
  </xs:element>
</xs:schema>